﻿//-----------------------------------------------------------------------
// <copyright>
//     Copyright (c) Artur Mustafin. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Expressions.Compiler.Interfaces
{

    /// <summary>
    /// Interface for the expression tree node
    /// </summary>
    public interface IExpressionTree<T>
    {
        /// <summary>
        /// Gets the child node
        /// </summary>
        /// <remarks>Gives access to the child node of the expression tree</remarks>
        /// <value>References accessed object</value>
        IExpressionTree<T> this[int counter] { get; }

        /// <summary>
        /// Gets the node context
        /// </summary>
        /// <value>Gives access to the current node's context</value>
        IExpressionContext<T> Context { get; }
    }

    /// <summary>
    /// Interface for the expression tree node
    /// </summary>
    public interface IExpressionTree
    {
        /// <summary>
        /// Gets the child node
        /// </summary>
        /// <remarks>Gives access to the child node of the expression tree</remarks>
        /// <value>References accessed object</value>
        IExpressionTree this[int counter] { get; }

        /// <summary>
        /// Gets the node context
        /// </summary>
        /// <value>Gives access to the current node's context</value>
        IExpressionContext Context { get; }
    }
}
